A popover can go unmanaged for 2 reasons, when the widget it points to
gets destroyed, or transitionally in gtk_popover_set_relative_to(). In
both of these cases it makes sense to only unset popover information
about the previous widget managing it, if the popover is meant to
survive the unmanaging through extra refs.
Also, the focus widget prior to a modal popover being shown is considered
information about the relative_to widget, unset it on
gtk_popover_update_relative_to() with the rest.
https://bugzilla.gnome.org/show_bug.cgi?id=736193
static void
_unmanage_popover (GObject *object)
{
- g_object_run_dispose (object);
+ gtk_popover_update_relative_to (GTK_POPOVER (object), NULL);
g_object_unref (object);
}
priv->window = NULL;
}
+ g_clear_object (&priv->prev_focus_widget);
+
if (priv->widget)
{
if (g_signal_handler_is_connected (priv->widget, priv->hierarchy_changed_id))